return "DISPLAY TEXT" & RETURN & RETURN & "This behavior allows you to display a given string in a field or text member. " & "Use it with the Tooltip and Hypertext - Display Status behaviors which need a field or text member in which to display their information. " & "Or create your own custom Lingo to display runtime information, such as the position of the mouse." & RETURN & RETURN & "This behavior waits for Lingo commands to tell it what to do. " & "It is not active by itself." & RETURN & RETURN & "You can choose between two display types: tooltip and status bar." & RETURN & RETURN & "The TOOLTIP type of display will make the field or text member resize itself to fit the text, and disappear when it is empty. " & "You can set the tooltip type display to appear at any position on the stage, such as under the cursor. " & "If no position is sent to the sprite, it will appear at the top left corner of the Stage. " & "See the Tooltip behavior for more details." & RETURN & RETURN & "If you wish to display several lines of text, you must use RETURN characters to define the line breaks. " & "An empty tooltip sprite will move off-stage to hide. " & "It is recommended that you place it off-stage before it is used, in case it causes a brief flash on the screen." & RETURN & RETURN & "The STATUS BAR type of display will appear on Stage at all times. " & "It will not resize or change position. " & "Any positional information sent to this sprite will be ignored if it is set to act as a status bar. " & "If the text is too long to appear in the member of the current sprite, a scrollbar will appear. " & "You do not need to divide the text with RETURN characters. " & "If you think that a scrollbar may be necessary, make sure that the field or text member is sufficiently tall for the scroll arrows to operate correctly." & RETURN & RETURN & "Set the font size and other characteristics of the field or text member to customize the appearance of the message." & RETURN & RETURN & "Be sure to give the field or text member a name. " & "It may be emptied by this behavior. " & "Director automatically erases nameless empty members." & RETURN & RETURN & "PERMITTED MEMBER TYPES:" & RETURN & "field and text" & RETURN & RETURN & "PARAMETERS:" & RETURN & "* Display type:" & RETURN & " - Tooltip (appears near the cursor on rollover)" & RETURN & " - Status bar (appears in a fixed position at all times)" & RETURN & RETURN & "PUBLIC METHODS:" & RETURN & "* Set the text to display (and the position of the sprite)" & RETURN & RETURN & "ASSOCIATED BEHAVIORS:" & RETURN & "* Tooltip" & RETURN & "* Source Status" & RETURN & "* Hypertext - Display Status"
end
on getBehaviorTooltip me
return "Use with field or text members." & RETURN & RETURN & "Waits for a message from another behavior or custom handler to display a character string. " & "This behavior is intended to be used with the Tooltip and Hypertext - Display Status behaviors to create a status bar or a tooltip under the cursor."
end
on beginSprite me
myDisplayType = resolve(myDisplayType)
initialize(me)
end
on endSprite me
mySprite.visible = 1
myMember.editable = myoriginaleditablestate
mySprite.locZ = myoriginallocz
end
on resolve prop
case prop of
myDisplayType:
choiceslist = ["status bar (fixed size and position)", "tooltip (dynamic size and position)"]
return [#myDisplayType: [#comment: "Display Text sprite behaves as a", #format: #string, #default: "status bar (fixed size and position)", #range: ["status bar (fixed size and position)", "tooltip (dynamic size and position)"]]]